package com.jk.dmconsumer.service;


import com.jk.dmcommon.entity.OrderEntity;
import com.jk.dmcommon.entity.ShippingEntity;
import com.jk.dmcommon.entity.CouponEntity;
import com.jk.dmcommon.entity.TreeEntity;
import com.jk.dmcommon.entity.LeaveEntity;
import com.jk.dmcommon.entity.SessionEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;
import com.jk.dmcommon.LybEntity.UserEntity;
import java.util.List;

/**
 * @author 赵优秀
 * @version 1.0.0
 * @ClassName TreeService.java
 * @Description TODO
 * @createTime 2021年09月07日 11:23:00
 */
@Component
@FeignClient(value = "dmuserprovider")
public interface TreeService {
    //查询树
    @RequestMapping("/tree/getTree")
    List<TreeEntity> getTree(@RequestParam("pid") Integer pid);
    //个人信息回显
    @RequestMapping("/tree/getByid")
    UserEntity getByid();
    //修改
    @PostMapping(value = "/tree/updateUser")
    String updateUser(@RequestBody  UserEntity user);
    //查询收货地址
    @RequestMapping("/tree/findAddress")
    List<ShippingEntity> findAddress();
    //新增收货地址
    @PostMapping("/tree/addAddress")
    void addAddress(@RequestBody ShippingEntity shipping);
    //删除地址
    @RequestMapping("/tree/delAddress")
    void delAddress(@RequestParam("id") Integer id);
    //回显地址
    @RequestMapping("/tree/getAddress")
    ShippingEntity getAddress(@RequestParam("id") Integer id);
    //查询优惠券
    @PostMapping("/tree/findCoupon")
    List<CouponEntity> findCoupon(@RequestBody CouponEntity coupon);
    //查询订单
    @PostMapping("/tree/findOrder")
    List<OrderEntity> findOrder(@RequestBody OrderEntity orderEntity);
    //查询场次
    @RequestMapping("/tree/getSession")
    List<SessionEntity> getSession(@RequestParam("goodsId") Integer goodsId);
    //获取档次
    @RequestMapping("/tree/getLeave")
    List<LeaveEntity> getLeave(@RequestParam("id") Integer id);
}
